/* PAGE LOGIN */
/* Основной контейнер */
.page-login {
    height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #c4b5fd 0%, #fefefe 100%);
    position: relative;
}

.page-login::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left,
            rgba(167, 139, 250, 0.5),
            transparent 70%);
    z-index: -1;
}

.page-login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    padding: 60px 40px;
    align-items: center;
}

/* Левая часть */
.page-login-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 100px 40px 20px 40px;
    height: 100%;
}

.page-login-info-text {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
}

.page-login-info-bottom-links {
    margin-top: 24px;
}

.page-login-info-links a {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
    margin-right: 16px;
}

.page-login-info-links a:hover {
    text-decoration: underline;
}

/* Правая часть */
.page-login-r {
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

/* Форма с анимацией */
.page-login-cont {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    max-width: 420px;
    width: 100%;
    /* Анимация */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideIn 0.6s ease forwards;
}

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Заголовок */
.page-login-title h1 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 24px;
}

/* Форма */
.page-login-form-log {
    display: flex;
    flex-direction: column;
}

.page-login-form-log label {
    font-size: 14px;
    font-weight: 500;
    margin: 16px 0 6px;
}

.page-login-form-log input {
    padding: 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fbff;
}

.page-login-form-log input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Нижний блок формы */
.page-login-form-ft {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0 24px;
}

.page-login-form-ft label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.forgot a {
    color: #3b82f6;
    text-decoration: none;
}

.forgot a:hover {
    text-decoration: underline;
}

/* Кнопка */
.main-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 20px 0 20px 0;
}

.main-btn:hover {
    background: #1d4ed8;
}

/* Регистрация */
.signup-link {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.signup-link a {
    color: #2563eb;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .page-login-container {
        gap: 40px;
    }

    .page-login-info-text {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .page-login-container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .page-login-info {
        padding: 0;
    }

    .page-login-r {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .page-login-cont {
        padding: 30px 20px;
    }

    .page-login-info-text {
        font-size: 22px;
    }
}

/*-------------------------------------------------------------------------------------------------*/

/* USER PROFILE */
.user-profile {
    grid-column: 1/13;
}

.user-profile-header {
    width: 100%;
    height: 250px;
    background: #2a7b9b;
    background: linear-gradient(90deg,
            rgba(42, 123, 155, 1) 0%,
            rgba(87, 199, 133, 1) 50%,
            rgba(237, 221, 83, 1) 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
.user-profile-inf {
    display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2.2vw, 20px);
  padding: clamp(12px, 2.2vw, 20px);
  background: #fff;
  color: #111;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.user-profile-avatar {
  position: relative;
  width: clamp(72px, 12vw, 96px);
  aspect-ratio: 1/1;
}
.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
  border: 2px solid #fff; /* «кольцо» под фон контейнера */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.08);
  display: block;
}

/* индикатор онлайна появляется только когда есть класс .is-online */
.user-profile-status {
  position: absolute;
  right: 2px; /* прижимаем к краю аватара */
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #22c55e; /* зелёный (emerald-500) */
  border: 2px solid #fff; /* белое кольцо, чтоб читалось на любом фоне */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); /* лёгкая глубина */
  pointer-events: none; /* не мешает кликам по аватару */
}

/* на ретина/крупных аватарах чуть увеличим точку */
@media (min-width: 640px) {
  .user-profile-status {
    width: 16px;
    height: 16px;
  }
}
.user-profile-meta {
  min-width: 0;
}
.user-profile-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.25rem 0;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.2;
}
.user-profile-name {
  font-weight: 700;
}
.user-profile-username {
  font-size: clamp(12px, 1.4vw, 14px);
  color: #6b7280; /* gray-500 */
}

.user-profile-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #4b5563; /* gray-600 */
  font-size: 14px;
}
.user-profile-role {
  font-weight: 500;
}
.user-profile-sep {
  opacity: 0.5;
}

.user-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: background 0.2s, border-color 0.2s, transform 0.06s;
}
.btn-icon:hover {
  background: #f3f4f6;
}
.btn-icon:active {
  transform: translateY(1px);
}
.btn-icon:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.btn-danger {
  border-color: #fee2e2;
  background: #fef2f2;
}
.btn-danger:hover {
  background: #fee2e2;
}
.btn-danger i {
  color: #b91c1c;
} /* красный для «выход» */

@media (max-width: 640px) {
  .user-profile-inf {
    grid-template-columns: auto 1fr;
    grid-auto-rows: auto;
  }
  .user-profile-actions {
    grid-column: 2/-1;
    justify-self: end;
  }
  .user-profile-avatar {
    width: clamp(64px, 18vw, 84px);
  }
}

.user-profile-wrap {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.user-profile-l {
    grid-column: 1/4;
}
.user-profile-r {
    grid-column: 4/13;
}

/*-------------------------------------------------------------------------------------------------*/